package com.ha8.netease.views.components
{
	import spark.components.SkinnableContainer;
	
	public class PushGroup extends SkinnableContainer
	{
		public function PushGroup()
		{
			super();
		}
		
		//--------------------------------------------------------------------------
		//
		//  SkinPart
		//
		//--------------------------------------------------------------------------
		
		[SkinPart(required="true")]
		public var pushBar:PushBar;
		
		//--------------------------------------------------------------------------
		//
		//  Variables
		//
		//--------------------------------------------------------------------------
		
		private var _title:String;

		/**
		 * 标题
		 */		
		public function get title():String
		{
			return _title;
		}

		public function set title(value:String):void
		{
			_title = value;
			
			if (pushBar)
				pushBar.title = _title;
		}
		
		//--------------------------------------------------------------------------
		//
		//  Overridden Methods
		//
		//--------------------------------------------------------------------------
		
		override protected function partAdded(partName:String, instance:Object):void
		{
			super.partAdded(partName, instance);
			if (instance == pushBar)
			{
				pushBar.title = title;
			}
		}
		
		override protected function partRemoved(partName:String, instance:Object):void
		{
			super.partRemoved(partName, instance);
		}
		
	}
}